import org.eclipse.jetty.server.Server;

import com.googlecode.connectlet.util.ClassPath;
import com.googlecode.connectlet.web.Jetty;

public class Startup {
	private static final ClassPath DEFAULT_HOME = ClassPath.getInstance("../../../..");
	private static final ClassPath DEFAULT_KEY_STORE = ClassPath.
			getInstance("../conf/localhost.pfx");
	private static final String DEFAULT_PASSWORD = "changeit";

	public static void main(String[] args) throws Exception {
		int port = (args.length == 0 ? 443 : Integer.parseInt(args[0], 443));
		Server server = Jetty.createServer(DEFAULT_HOME, port,
				DEFAULT_KEY_STORE, DEFAULT_PASSWORD);
		server.start();
		server.join();
/*
		StandardService service = Tomcat.createService(DEFAULT_HOME, port,
				DEFAULT_KEY_STORE, DEFAULT_PASSWORD);
		service.start();
		while (true) {
			Thread.sleep(1000);
		}
*/
	}
}